why my validation is not working